import request from '../utils/request'

// 增加医学常识  likes  medicalContent  medicalName reading
export const addMedical = (params) => {
  return request.post('/app/medical/addMedial', params)
}

// 删除医学常识 mid 
export const deleteMedical = (id) => {
  return request.del(`/app/medical/deleteMedical?mid=${id}`)
}

// 获取医学知识列表 name pageNum pageSize
export const  MedicalList = (params) => {
  return request.get('/app/medical/findMedeical', params)
}

// 修改医学常识 likes  medicalContent  medicalName reading mid
export const  updateMedical = (params) => {
  return request.put('/app/medical/updateMedical', params)
}

// 获取医学知识列表详情 mid
export const MedicalDetails = (params) => {
  return request.get('/app/medical/findOneMedical', params)
}

// 增加红医故事  likes  content  name reading
export const addMedicalStory = (params) => {
    return request.post('/app/story/addStory', params)
  }
  
  // 删除红医故事 storyId
  export const deleteMedicalStory  = (id) => {
    return request.del(`/app/story/deleteStory?storyId=${id}`)
  }
  
  // 获取红医故事列表 name pageNum pageSize
  export const  MedicalListStory  = (params) => {
    return request.get('/app/story/findStory', params)
  }
  
  // 修改红医故事 likes  content  name reading  storyId
  export const  updateMedicalStory  = (params) => {
    return request.put('/app/story/updateStory', params)
  }
  
  // 获取红医故事列表详情 storyId
  export const MedicalDetailsStory  = (params) => {
    return request.get('/app/story/findOneStory', params)
  }
  